In [1]:
import trimesh
def load_mesh_scene(filename, show_edges=False):
mesh = trimesh.load(filename)
color = [128, 176, 255, 255]
mesh.visual.face_colors = color
geometries = [mesh]
if show_edges:
edges = mesh.face_adjacency_edges
path = trimesh.path.Path3D(**trimesh.path.exchange.misc.edges_to_path(edges, mesh.vertices.copy()))
geometries.append(path)
scene = trimesh.Scene(geometries)
return scene
In [2]:
mesh = load_mesh_scene("Radial scales_fixed13-5m.stl")
In [3]:
mesh.show()
Out[3]: